package com.myrpc.register;

import com.myrpc.exception.MyRpcException;
import com.myrpc.transfer.dto.RpcRequest;

import java.net.InetAddress;
import java.net.InetSocketAddress;

/**
 * 服务发现
 */
public interface ServiceDiscovery {
    /**
     * 根据请求寻找微服务地址
     * @param rpcRequest rpc请求
     * @return 服务地址
     */
    InetSocketAddress discoveryService(RpcRequest rpcRequest) throws MyRpcException;
}
